.TH "MainWindow" 3 "9 Jun 2009" "QMediaLinker" \" -*- nroff -*-
.ad l
.nh
.SH NAME
MainWindow \- 
.SH SYNOPSIS
.br
.PP
\fC#include <mainwindow.h>\fP
.PP
Inherits \fBQMainWindow\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBMainWindow\fP ()"
.br
.ti -1c
.RI "\fB~MainWindow\fP ()"
.br
.in -1c
.SS "Private Slots"

.in +1c
.ti -1c
.RI "void \fBabout\fP ()"
.br
.ti -1c
.RI "void \fBnewdbslot\fP ()"
.br
.ti -1c
.RI "void \fBnewdbslot\fP (\fBnewdbDialog\fP *dialog)"
.br
.ti -1c
.RI "void \fBnewdbslot\fP (const QString &type, const QString &host, const QString &name, const QString &port, const QString &user, const QString &nick, const QString &comm)"
.br
.ti -1c
.RI "void \fBnewMovieSlot\fP ()"
.br
.ti -1c
.RI "void \fBnewAlbumSlot\fP ()"
.br
.ti -1c
.RI "void \fBdeleteSlot\fP ()"
.br
.ti -1c
.RI "void \fBfillLists\fP ()"
.br
.ti -1c
.RI "void \fBupdateMovieView\fP (const QModelIndex &index)"
.br
.ti -1c
.RI "void \fBupdateAlbumView\fP (const QModelIndex &index)"
.br
.ti -1c
.RI "void \fBcloseActiveTab\fP ()"
.br
.ti -1c
.RI "void \fBconnectToDbFromList\fP (QModelIndex idx)"
.br
.in -1c
.SS "Private Member Functions"

.in +1c
.ti -1c
.RI "void \fBcreateActions\fP ()"
.br
.ti -1c
.RI "void \fBcreateStatusBar\fP ()"
.br
.ti -1c
.RI "void \fBcreateDocks\fP ()"
.br
.ti -1c
.RI "void \fBcreateMenu\fP ()"
.br
.in -1c
.SS "Private Attributes"

.in +1c
.ti -1c
.RI "QMenu * \fBfileMenu\fP"
.br
.ti -1c
.RI "QMenu * \fBeditMenu\fP"
.br
.ti -1c
.RI "QMenu * \fBviewMenu\fP"
.br
.ti -1c
.RI "QMenu * \fBtoolMenu\fP"
.br
.ti -1c
.RI "QMenu * \fBhelpMenu\fP"
.br
.ti -1c
.RI "\fBConfig\fP * \fBcfg\fP"
.br
.ti -1c
.RI "QDockWidget * \fBdbDock\fP"
.br
.ti -1c
.RI "QDockWidget * \fBcontentDock\fP"
.br
.ti -1c
.RI "QListWidget * \fBdbList\fP"
.br
.ti -1c
.RI "QToolBox * \fBcontentBox\fP"
.br
.ti -1c
.RI "QTreeView * \fBmovieView\fP"
.br
.ti -1c
.RI "QTreeView * \fBalbumsView\fP"
.br
.ti -1c
.RI "\fBQSqlTableModel\fP * \fBalbumModel\fP"
.br
.ti -1c
.RI "\fBQSqlTableModel\fP * \fBmovieModel\fP"
.br
.ti -1c
.RI "\fBQWidget\fP * \fBcurrentMedia\fP"
.br
.ti -1c
.RI "\fBMovie\fP * \fBcurrentMovie\fP"
.br
.ti -1c
.RI "\fBAlbum\fP * \fBcurrentAlbum\fP"
.br
.ti -1c
.RI "QTabWidget * \fBcentral\fP"
.br
.ti -1c
.RI "QPushButton * \fBcloseTabButton\fP"
.br
.ti -1c
.RI "QIcon \fBcloseIcon\fP"
.br
.ti -1c
.RI "\fBAlbumList\fP \fBalbumList\fP"
.br
.ti -1c
.RI "\fBMovieList\fP \fBopenedMovies\fP"
.br
.ti -1c
.RI "\fBnewdbDialog\fP * \fBdbDialog\fP"
.br
.ti -1c
.RI "\fBdbConnector\fP * \fBcurrentDb\fP"
.br
.ti -1c
.RI "QList< \fBdbConnector\fP * > \fBdbPointerList\fP"
.br
.ti -1c
.RI "QAction * \fBnewdbAct\fP"
.br
.ti -1c
.RI "QAction * \fBquitAct\fP"
.br
.ti -1c
.RI "QAction * \fBnewMovieAct\fP"
.br
.ti -1c
.RI "QAction * \fBnewAlbumAct\fP"
.br
.ti -1c
.RI "QAction * \fBdeleteAct\fP"
.br
.ti -1c
.RI "QAction * \fBaboutAct\fP"
.br
.ti -1c
.RI "QAction * \fBaboutQtAct\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The \fBMainWindow\fP Class allows the definition of the Main Window of the application. 
.PP
\fBAuthor:\fP
.RS 4
Yannis Mazzer 
.RE
.PP

.SH "Constructor & Destructor Documentation"
.PP 
.SS "MainWindow::MainWindow ()"
.PP
This is the \fBMainWindow\fP constructor. 
.PP
References cfg, createActions(), createDocks(), createMenu(), createStatusBar(), Config::get(), and newdbslot().
.SS "MainWindow::~MainWindow ()"
.PP
This is the \fBMainWindow\fP destructor. 
.SH "Member Function Documentation"
.PP 
.SS "void MainWindow::about ()\fC [private, slot]\fP"
.PP
This slot popups the about dialog which describes the application. 
.PP
Referenced by createActions().
.SS "void MainWindow::newdbslot ()\fC [private, slot]\fP"
.PP
This slot popups the new database form which is used to add a database. 
.PP
References dbDialog, and fillLists().
.PP
Referenced by createActions(), fillLists(), and MainWindow().
.SS "void MainWindow::newdbslot (\fBnewdbDialog\fP * dialog)\fC [private, slot]\fP"
.PP
This overload is provided by convenience to draw a new database form from another one, this is useful when an error occured when connecting to the database. 
.PP
\fBParameters:\fP
.RS 4
\fIdialog\fP an already filled new database dialog. 
.RE
.PP

.PP
References dbDialog, and fillLists().
.SS "void MainWindow::newdbslot (const QString & type, const QString & host, const QString & name, const QString & port, const QString & user, const QString & nick, const QString & comm)\fC [private, slot]\fP"
.PP
This overload is provided by convenience to draw a new database form from passed arguments, this is useful when creating the form from values stored in the config file. 
.PP
\fBParameters:\fP
.RS 4
\fItype\fP the driver used to connect to the database. 
.br
\fIhost\fP the Hostname of the server hosting the database. 
.br
\fIname\fP the name of the database or the file if SQLite. 
.br
\fIport\fP the port to which the database daemon is listening. 
.br
\fIuser\fP the login used to connect. 
.br
\fInick\fP a nickname the user wants to use for the added database. 
.br
\fIcomm\fP a comment the user wants to use for the added database. 
.RE
.PP

.PP
References dbDialog, and fillLists().
.SS "void MainWindow::newMovieSlot ()\fC [private, slot]\fP"
.PP
This slot is used when the user wants to add a new \fBMovie\fP to the database. It updates the central widget to an empty \fBMovie\fP form. 
.PP
References movieModel, and updateMovieView().
.PP
Referenced by createActions().
.SS "void MainWindow::newAlbumSlot ()\fC [private, slot]\fP"
.PP
This slot is used when the user wants to add a new \fBAlbum\fP to the database. It updates the central widget to an empty \fBAlbum\fP form. 
.PP
References albumModel, and updateAlbumView().
.PP
Referenced by createActions().
.SS "void MainWindow::deleteSlot ()\fC [private, slot]\fP"
.PP
This slot is used when the user wants to delete the current viewed Media. 
.PP
References albumModel, currentAlbum, currentMedia, currentMovie, Album::getIndex(), Movie::getIndex(), and movieModel.
.PP
Referenced by createActions().
.SS "void MainWindow::fillLists ()\fC [private, slot]\fP"
.PP
This slot checks the newly added database connection state and fill the Treeview with retrieved media if the connection is established or redraw the new database form. 
.PP
References albumModel, albumsView, currentDb, dbDialog, dbList, dbConnector::getNickName(), movieModel, movieView, newdbslot(), dbConnector::retrieveAlbums(), dbConnector::retrieveMovies(), newdbDialog::setUpDatabase(), updateAlbumView(), and updateMovieView().
.PP
Referenced by newdbslot().
.SS "void MainWindow::updateMovieView (const QModelIndex & index)\fC [private, slot]\fP"
.PP
This slot updates the central widget so that it shows a \fBMovie\fP Widget containing the informations of the record @ index in the Model. 
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP the index of the wanted record in the database. 
.RE
.PP

.PP
References currentMedia, currentMovie, movieModel, and Movie::setModelIndex().
.PP
Referenced by fillLists(), and newMovieSlot().
.SS "void MainWindow::updateAlbumView (const QModelIndex & index)\fC [private, slot]\fP"
.PP
This slot updates the central widget so that it shows a \fBAlbum\fP Widget containing the informations of the record @ index in the Model. 
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP the index of the wanted record in the database. 
.RE
.PP

.PP
References albumModel, currentAlbum, currentMedia, and Album::setModelIndex().
.PP
Referenced by fillLists(), and newAlbumSlot().
.SS "void MainWindow::closeActiveTab ()\fC [private, slot]\fP"
.PP
This slot was used when new widgets were drawn in a QTabWidget, it is not used currently but will be. It closes the active tab if there is one in the central QTabWidget. 
.PP
References central.
.SS "void MainWindow::connectToDbFromList (QModelIndex idx)\fC [private, slot]\fP"
.PP
This slot is not used yet, it will change the currently used database to the one selected in the list. 
.PP
\fBParameters:\fP
.RS 4
\fIidx\fP index of the wanted database in the list. 
.RE
.PP

.PP
Referenced by createDocks().
.SS "void MainWindow::createActions ()\fC [private]\fP"
.PP
This procedure creates the actions which will be connected to the menu entries. 
.PP
References about(), aboutAct, aboutQtAct, deleteAct, deleteSlot(), newAlbumAct, newAlbumSlot(), newdbAct, newdbslot(), newMovieAct, newMovieSlot(), and quitAct.
.PP
Referenced by MainWindow().
.SS "void MainWindow::createStatusBar ()\fC [private]\fP"
.PP
This procedure creates the statusbar and write a welcome message in it. 
.PP
Referenced by MainWindow().
.SS "void MainWindow::createDocks ()\fC [private]\fP"
.PP
This procedure creates the dock widgets which are used to show the databases list and the media list. 
.PP
References albumsView, connectToDbFromList(), contentBox, contentDock, dbDock, dbList, movieView, and viewMenu.
.PP
Referenced by MainWindow().
.SS "void MainWindow::createMenu ()\fC [private]\fP"
.PP
This procedure populates the menubar. 
.PP
References aboutAct, aboutQtAct, deleteAct, editMenu, fileMenu, helpMenu, newAlbumAct, newdbAct, newMovieAct, quitAct, and viewMenu.
.PP
Referenced by MainWindow().
.SH "Member Data Documentation"
.PP 
.SS "QMenu* \fBMainWindow::fileMenu\fP\fC [private]\fP"
.PP
Referenced by createMenu().
.SS "QMenu* \fBMainWindow::editMenu\fP\fC [private]\fP"
.PP
Referenced by createMenu().
.SS "QMenu* \fBMainWindow::viewMenu\fP\fC [private]\fP"
.PP
Referenced by createDocks(), and createMenu().
.SS "QMenu* \fBMainWindow::toolMenu\fP\fC [private]\fP"
.PP
.SS "QMenu* \fBMainWindow::helpMenu\fP\fC [private]\fP"
.PP
Referenced by createMenu().
.SS "\fBConfig\fP* \fBMainWindow::cfg\fP\fC [private]\fP"
.PP
Referenced by MainWindow().
.SS "QDockWidget* \fBMainWindow::dbDock\fP\fC [private]\fP"
.PP
Referenced by createDocks().
.SS "QDockWidget* \fBMainWindow::contentDock\fP\fC [private]\fP"
.PP
Referenced by createDocks().
.SS "QListWidget* \fBMainWindow::dbList\fP\fC [private]\fP"
.PP
Referenced by createDocks(), and fillLists().
.SS "QToolBox* \fBMainWindow::contentBox\fP\fC [private]\fP"
.PP
Referenced by createDocks().
.SS "QTreeView* \fBMainWindow::movieView\fP\fC [private]\fP"
.PP
Referenced by createDocks(), and fillLists().
.SS "QTreeView* \fBMainWindow::albumsView\fP\fC [private]\fP"
.PP
Referenced by createDocks(), and fillLists().
.SS "\fBQSqlTableModel\fP* \fBMainWindow::albumModel\fP\fC [private]\fP"
.PP
Referenced by deleteSlot(), fillLists(), newAlbumSlot(), and updateAlbumView().
.SS "\fBQSqlTableModel\fP* \fBMainWindow::movieModel\fP\fC [private]\fP"
.PP
Referenced by deleteSlot(), fillLists(), newMovieSlot(), and updateMovieView().
.SS "\fBQWidget\fP* \fBMainWindow::currentMedia\fP\fC [private]\fP"
.PP
Referenced by deleteSlot(), updateAlbumView(), and updateMovieView().
.SS "\fBMovie\fP* \fBMainWindow::currentMovie\fP\fC [private]\fP"
.PP
Referenced by deleteSlot(), and updateMovieView().
.SS "\fBAlbum\fP* \fBMainWindow::currentAlbum\fP\fC [private]\fP"
.PP
Referenced by deleteSlot(), and updateAlbumView().
.SS "QTabWidget* \fBMainWindow::central\fP\fC [private]\fP"
.PP
Referenced by closeActiveTab().
.SS "QPushButton* \fBMainWindow::closeTabButton\fP\fC [private]\fP"
.PP
.SS "QIcon \fBMainWindow::closeIcon\fP\fC [private]\fP"
.PP
.SS "\fBAlbumList\fP \fBMainWindow::albumList\fP\fC [private]\fP"
.PP
.SS "\fBMovieList\fP \fBMainWindow::openedMovies\fP\fC [private]\fP"
.PP
.SS "\fBnewdbDialog\fP* \fBMainWindow::dbDialog\fP\fC [private]\fP"
.PP
Referenced by fillLists(), and newdbslot().
.SS "\fBdbConnector\fP* \fBMainWindow::currentDb\fP\fC [private]\fP"
.PP
Referenced by fillLists().
.SS "QList<\fBdbConnector\fP *> \fBMainWindow::dbPointerList\fP\fC [private]\fP"
.PP
.SS "QAction* \fBMainWindow::newdbAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::quitAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::newMovieAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::newAlbumAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::deleteAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::aboutAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().
.SS "QAction* \fBMainWindow::aboutQtAct\fP\fC [private]\fP"
.PP
Referenced by createActions(), and createMenu().

.SH "Author"
.PP 
Generated automatically by Doxygen for QMediaLinker from the source code.
